package com.sun.boot.dubbo.service.consumer.controller;

import com.sun.api.SiteService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Package: com.sun.boot.dubbo.service.consumer.controller
 * @ClassName: SiteController
 * @Author: sgq
 * @Date: 2023/12/5 16:14
 * @Description: TODD
 */

@RestController
@RequestMapping("/site")
public class SiteController {

    @Reference
    private SiteService siteService;

    @GetMapping("/name")
    public String siteName(String name){
        String serviceName = siteService.getName(name);
        return serviceName;
    }

}
